package com.wgj.android.fragment;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jiaai.xui.utils.http.ListHttpCallBack;
import com.jiaai.xui.utils.http.XHttp;
import com.jiaai.xui.view.widget.XToast;
import com.wgj.android.R;
import com.wgj.android.entity.AllCard;
import com.wgj.android.http.WGJAPI;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
public class CardcaseFragment extends Fragment {
    @BindView(R.id.recycler_view)
    RecyclerView recyclerView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_cardcase, container, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView();
    }

    private void initView() {
        XHttp.obtain().get(WGJAPI.FIND_ALL_CARD, null, new ListHttpCallBack<AllCard>() {
            @Override
            public void onSuccess(List<AllCard> list) {

                for (int i = 0; i < list.size(); i++) {

                }
            }

            @Override
            public void onFailed(int i, String s, boolean b) {
                //XToast.success("创建失败");

            }
        });
    }

}
